package net.uhuijia.zb.userzhubo.service.impl;

import net.uhuijia.zb.userzhubo.service.UserZhuboService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import net.uhuijia.appbase.service.CrudService;
import net.uhuijia.zb.userzhubo.persistence.dao.UserZhuboDao;
import net.uhuijia.zb.userzhubo.persistence.model.UserZhubo;
import net.uhuijia.zb.userzhubo.persistence.model.UserZhuboExample;


@Service
@Transactional
public class UserZhuboServiceImpl
     extends CrudService<UserZhuboDao,UserZhubo,UserZhuboExample> implements UserZhuboService{
    @Autowired
    private UserZhuboDao userZhuboDao;

    /**
     * 根据UserId 获取主播信息
     * @param usreId
     * @return
     */
    @Override
    public UserZhubo getUserZhuboByUserId(String usreId) {
        if(StringUtils.isEmpty(usreId)) {
            throw new IllegalArgumentException();
        }
        UserZhubo userZhubo = this.userZhuboDao.getUserZhuboByUserId(usreId);
        return userZhubo;
    }
}